Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup menu cleanup #697

Merged
merged 7 commits into from
Nov 17, 2022
Merged

Popup menu cleanup #697

merged 7 commits into from
Nov 17, 2022

Conversation

nikku
Copy link
Member

@nikku nikku commented Nov 16, 2022

Proposing this PR to address #696 (comment) + minor nit picks (mainly around formatting).


One thing that I found is that we have to be careful with the way we format html template strings. Best practice is to have start and end on separate, individual lines:

html`
  <foo>
    <a href="...">...</a>
  </foo>
`

If we approach it like this then we end up with very readable templates, and eslint is happy, too.

@nikku nikku requested a review from smbea November 16, 2022 20:45
@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Nov 16, 2022
@nikku nikku force-pushed the popup-menu-cleanup branch 2 times, most recently from aa81b99 to c2d9344 Compare November 16, 2022 20:46
onKeyup=${ handleKey }
onKeydown=${ handleKeyDown }
/>
${entry.imageUrl ? html`<img src=${ entry.imageUrl } />` : null}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing that I found is that we have to be careful with the way we format html template strings. Best practice is to have start and end on separate, individual lines.

Should we not have inline html`` like here then?

Copy link
Member Author

@nikku nikku Nov 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not screw up the markup, hence I'd be OK with this snippet.

What breaks the markup entirely is stuff like this:

html`
<div>
  <a>...</a>
</div>`

=> Asymetric use of tagged template literal open + close.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it!

@smbea
Copy link
Contributor

smbea commented Nov 17, 2022

chore(popup-menu): don't leak resultsRef: Scrolling into view can be handled within the <PopupMenuComponent />.

Description says component but I guess you meant in the commit description since you moved from the Component to the List

@nikku
Copy link
Member Author

nikku commented Nov 17, 2022

Fixed #697 (comment) via 05ddb4f.

Copy link
Contributor

@smbea smbea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@nikku nikku merged commit 929e089 into develop Nov 17, 2022
@nikku nikku deleted the popup-menu-cleanup branch November 17, 2022 14:12
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants